//
//  WJJCalendarLogic.h
//  HTTestPro
//
//  Created by JunWang on 16/3/9.
//  Copyright © 2016年 JunWang. All rights reserved.
//

#import <Foundation/Foundation.h>

enum {
    WJJFestivalNone = 0,
    WJJSpringFestival,
    WJJLanternFestival,
    WJJQingMingFestival,
    WJJDragonBoatFestival,
    WJJMidAutumnFestival,
    WJJDoubleNinthFestival,
    WJJNewYearDay,
    WJJWomenDay,
    WJJLaborDay,
    WJJYouthDay,
    WJJChildrenDay,
    WJJPartyBirthday,
    WJJArmyDay,
    WJJTeacherDay,
    WJJNationalDay,
    WJJSingleDay,
} typedef WJJFestivalType;

enum {
    WJJCalendarDayViewNotSelected = 0,
    WJJCalendarDayViewWholeSelection,
    WJJCalendarDayViewStartOfSelection,
    WJJCalendarDayViewWithinSelection,
    WJJCalendarDayViewEndOfSelection,
} typedef WJJCalendarDayViewSelectionState;

enum {
    WJJCalendarDayViewStartOfWeek = 0,
    WJJCalendarDayViewMidWeek,
    WJJCalendarDayViewEndOfWeek,
} typedef WJJCalendarDayViewPositionInWeek;



@interface WJJCalendarLogic : NSObject


/**
 * 判断是否为今天
 *
 * @param:  传入对比日期
 *
 * @return: 若为今天返回为真，反之为假
 */

+ (BOOL)isToday:(NSDateComponents *)day;


/**
 * 判断是否为节日
 *
 * @param:  传入判断日期
 *
 * @return: 返回节日类型
 */

+ (WJJFestivalType)checkFestival:(NSDateComponents *)day;

+ (BOOL)needRest:(NSDateComponents *)day;

/**
 * 检测是否与前个月无重叠
 *
 * @param:  传入日期
 *
 * @return: true表示无重叠 ，false为有重叠
 */
+ (BOOL)isNoOverlappedWithlastMonth:(NSDateComponents*)month;

@end
